package javaweb_work01.main.Service;

import javaweb_work01.main.Dao.CountStudentsDao;
import javaweb_work01.main.Factory.StudentsFactory;

public class CountService {
    //合成复用原则
    private CountStudentsDao countStudentsDao;

    public CountService(){
        this.countStudentsDao = StudentsFactory.getCountStudentsDao();
    }

    public int countStudentsService(){
        return countStudentsDao.countStudents();
    }
}
